package idea;

import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author: DRevelation
 * @Date: 2021/1/7 13:40
 */
@Slf4j
public class IdeaInjectDemo {
    public static void main(String[] args) {
        String url = "http://dbxz1-hw.ahtv.cn/ahtv-obs/20210109/e7eb5121-6c78-9300-b6f7-ffeb6c6fed89.mp4";
        String[] urlStr = url.split("ahtv.cn");
        for (int i = 0; i < urlStr.length; i++) {
            System.out.println(urlStr[i]);
        }

        JSONObject words = new JSONObject();
        JSONArray array = new JSONArray();
        array.add("3sb");
        words.put("words", array);
        String result = HttpUtil.post("http://zbbf-hw.ahtv.cn/sensitive/api/words/save", words.toString());
        log.info("sens2SobeyByHttp-result=" + result);
    }
}
